package cn.gson.crm.controller;

import cn.gson.crm.model.pojos.ExchangeGoods;
import cn.gson.crm.model.pojos.ReplacementDetails;
import cn.gson.crm.model.service.ExchangegoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/ExchangegoodsContract")
public class ExchangegoodsController {
    @Autowired
    ExchangegoodsService exchangegoodsService;
    @RequestMapping("/ContractMethod")
    @ResponseBody
    //查询换货记录
    public Map<String,Object> selectexchagood(HttpSession session, Integer eid, Integer page, Integer size){
        return exchangegoodsService.selectexchagood(session,eid,page,size);
    };
    @RequestMapping("/ContractMethod1")
    @ResponseBody
    //查询换货记录
    public Map<String,Object> selectetime(HttpSession session,Integer eid,String statr,String endtime,Integer page, Integer size){
        return exchangegoodsService.selectetime(session,eid,statr,endtime,page,size);
    };
    @RequestMapping("/ContractMethod2")
    @ResponseBody
    //查询换货记录
    public Map<String,Object> selectwhere(HttpSession session,Integer eid,String where,Integer page, Integer size){
        return exchangegoodsService.selectwhere(session,eid,where,page,size);
    };
    @RequestMapping("/ContractMethod3")
    @ResponseBody
    //查详情
    public List<ReplacementDetails> selectdat(Integer eid){
        return exchangegoodsService.selectdat(eid);
    };
}
